package com.bytenebula.entity;

import com.bytenebula.entity.core.TenantEntity;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;

import java.io.Serial;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;

/**
 *  实体类。
 *
 * @author patrick
 * @since 2024-10-30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table(value = "bn_words", dataSource = "bytenebula")
public class BnWord extends TenantEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Integer groupId;
    private String wordName;
    private String wordCode;
    private String wordValue;
    private String comment;
    private Integer isDelete;
    private Integer isActive;

    @RelationOneToMany(selfField = "id", targetTable = "bn_words", targetField = "groupId")
    private List<BnWord> words;
}
